/**
 * gpms
 * 2012-8-20 下午5:39:43
 * 作者：陈志明
 * 
 */
package com.gpms.privilege.action;

import java.util.List;

import org.apache.commons.lang3.StringUtils;

import com.gpms.common.action.BaseActionSupport;
import com.gpms.mapper.*;

/**
 * @author Jackie chen
 *
 */
public class ItemAction extends BaseActionSupport{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 5616875261917594972L;
	private List<Item> itemList;
	private List<Item> itemTreeList;
	private List<ItemDetails> itemDetailsList;
	private Item item;
	private ItemDetails itemDetails;
	
	/**
	 * 
	 * @return
	 */
	public String getItemAll(){
		itemList=itemService.getAllItem();
		if(!StringUtils.equals(itemDetails.getParentid(), "0")){
			itemDetailsList=itemDetailsService.getItemDetailsByParentId(itemDetails.getParentid());
		}
		return null;
	}
	
	
	

	/**
	 * @return the itemList
	 */
	public List getItemList() {
		return itemList;
	}

	/**
	 * @return the itemTree
	 */
	public List getItemTreeList() {
		return itemTreeList;
	}

	/**
	 * @return the itemDetailsList
	 */
	public List getItemDetailsList() {
		return itemDetailsList;
	}

	/**
	 * @return the item
	 */
	public Item getItem() {
		return item;
	}

	/**
	 * @param item the item to set
	 */
	public void setItem(Item item) {
		this.item = item;
	}

	/**
	 * @return the itemDetails
	 */
	public ItemDetails getItemDetails() {
		return itemDetails;
	}

	/**
	 * @param itemDetails the itemDetails to set
	 */
	public void setItemDetails(ItemDetails itemDetails) {
		this.itemDetails = itemDetails;
	}
}
